<html xmlns:concordion="http://www.concordion.org/2007/concordion">
<link href="../../concordion.css" rel="stylesheet" type="text/css" />
<body>

<h1>Partial Matches</h1>

<p>
    Username searches return partial matches, i.e. all usernames containing 
    the search string are returned.
</p>

<div class="example">

    <h3>Example</h3>
    
    <p>Given these users:</p>
    
    <table concordion:execute="setUpUser(#username)">
        <tr><th concordion:set="#username">Username</th></tr>
        <tr><td>john.lennon</td></tr>
        <tr><td>ringo.starr</td></tr>
        <tr><td>george.harrison</td></tr>
        <tr><td>paul.mccartney</td></tr>
    </table>

    <p>Searching for "<b concordion:set="#searchString">arr</b>" will return:</p>
    
    <table concordion:verifyRows="#username : getSearchResultsFor(#searchString)">
        <tr><th concordion:assertEquals="#username">Matching Usernames</th></tr>
        <tr><td>george.harrison</td></tr>
        <tr><td>ringo.starr</td></tr>
    </table>        

    <p>Here's a table with gratuitous use of COLSPAN and ROWSPAN:</p>

    <table concordion:execute="#results = getSearchResultsFor(#searchString)">
        <thead>
            <tr>
                <th concordion:set="#searchString">Search String</th>
                <th concordion:assertEquals="getMatchFromResults(#results, #TEXT)" colspan="3">Possible Matches</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>ar</td>
                <td>george.harrison</td>
                <td>paul.mccartney</td>
                <td rowspan="3">ringo.starr</td>
            </tr>
            <tr>
               <td>s</td>
               <td colspan="2">george.harrison</td>
            </tr>
            <tr>
                <td>n</td>
                <td>george.harrison</td>
                <td>john.lennon</td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>